/*****************************************************************************/
/**
 *  @file   Export.cpp
 *  @author Naohisa Sakamoto
 */
/*----------------------------------------------------------------------------
 *
 *  Copyright (c) Visualization Laboratory, Kyoto University.
 *  All rights reserved.
 *  See http://www.viz.media.kyoto-u.ac.jp/kvs/copyright/ for details.
 *
 *  $Id$
 */
/*****************************************************************************/
#include "Export.h"
#include "Import.h"
#include "SPHFile.h"
#include "SPHFileList.h"
#include <kvs/StructuredVolumeExporter>


namespace kvsbloodvis
{

namespace util
{

kvs::AVSField Export( const SPHFile& sph, const bool byte )
{
    kvs::StructuredVolumeObject volume = Import( sph, byte );
    kvs::StructuredVolumeExporter<kvs::AVSField> exporter( &volume );
    kvs::AVSField avs = exporter;
    return avs;
}

kvs::AVSField Export( const SPHFileList& sph_list, const bool byte )
{
    kvs::StructuredVolumeObject volume = Import( sph_list, byte );
    kvs::StructuredVolumeExporter<kvs::AVSField> exporter( &volume );
    kvs::AVSField avs = exporter;
    return avs;
}

} // end of namespace util

} // end of namespace kvsbloodvis
